<!DOCTYPE html>
<html>
<head>
    <title>工装--出库记录</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div id="reviewLayer" style="display: none;">
        <form class="form-horizontal" style="width: 350px;">
            <div class="form-group">
                <div class="form-group">
                    <div class="col-sm-2 control-label">系统编码</div>
                    <span class="label label-success" style="vertical-align: bottom;">{{toolsPartOut.systemCode}}</span>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">名称</div>
                    <span class="label label-success" style="vertical-align: bottom;">{{toolsPartOut.name}}</span>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">审核状态</div>
                    <div class="col-sm-10" style="margin-top: 6px">
                        <Radio-group v-model="toolsPartOut.checkStatus">
                            <Radio :label="1" ><span>通过</span></Radio>
                            <Radio :label="2" ><span>未通过</span></Radio>
                        </Radio-group>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="3">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.mapNo" @on-enter="query" placeholder="图号"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.useProcedure" @on-enter="query" placeholder="使用工序"></i-input>
                </i-col>
                <i-col span="3">
                    <Date-picker type="date" v-model="q.beginTime" placeholder="出库开始时间"></Date-picker>
                </i-col>
                <i-col span="3">
                    <Date-picker type="date" v-model="q.endTime" placeholder="出库结束时间"></Date-picker>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                <i-button type="info" @click="goToolsBack"><i class="fa fa-bars"></i>&nbsp;工装退库</i-button>
                <!--   #if($shiro.hasPermission("toolspartout:review"))
                   <i-button type="primary" @click="review"><i class="fa fa-gavel"></i>&nbsp;审核</i-button>
                   #end-->
                #if($shiro.hasPermission("toolspartout:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("toolspartout:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("toolspartout:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="toolsPartOut" :rules="ruleValidate" :label-width="120">
            <Row>
                <i-col span="11">
                    <Form-item label="出库单号" prop="outCode">
                        <i-input v-model="toolsPartOut.outCode" placeholder="出库单号" readonly></i-input>
                    </Form-item>
                </i-col>

                <i-col span="11" offset="2">
                    <Form-item label="系统编码" prop="systemCode">
                        <i-input v-model="toolsPartOut.systemCode" placeholder="系统编码" readonly ></i-input>
                    </Form-item>

                </i-col>
            </Row>
            <Row>
                <i-col span="11" >
                    <Form-item label="出库日期" prop="outDate">
                        <Date-picker type="datetime" format="yyyy-MM-dd HH:mm" v-model="toolsPartOut.outDate" placeholder="出库日期"></Date-picker>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="预计使用时间" prop="expectUseTime">
                        <Date-picker type="datetime" format="yyyy-MM-dd HH:mm"  v-model="toolsPartOut.expectUseTime" placeholder="预计使用时间"></Date-picker>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="名称" prop="name">
                        <i-input v-model="toolsPartOut.name" placeholder="名称" readonly>
                        </i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="工装编码" prop="systemCode">
                        <i-input v-model="toolsPartOut.systemCode" placeholder="工装编码" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="出库仓库" prop="outStore">
                        <i-input v-model="toolsPartOut.outStoreId" v-show="false"></i-input>
                        <i-input v-model="toolsPartOut.outStore" placeholder="出库仓库" readonly icon="md-arrow-dropdown-circle" @on-click="getStoreHouse"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="出库数量" prop="outNum">
                        <i-input type="number" v-model="toolsPartOut.outNum" placeholder="出库数量"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
<!--                <i-col span="11">-->
<!--                    <Form-item label="所属工装" prop="partId">-->
<!--                        <i-input v-model="partName" placeholder="所属工装"></i-input>-->
<!--                    </Form-item>-->
<!--                </i-col>-->
                <!--                <i-col span="11">-->
                <!--                    <Form-item label="货位" prop="cargoLocation" offset="2">-->
                <!--                        <i-input v-model="toolsPartOut.cargoLocation" placeholder="货位" readonly></i-input>-->
                <!--                    </Form-item>-->
                <!--                </i-col>-->
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="规格" prop="spec">
                        <i-input v-model="toolsPartOut.spec" placeholder="规格" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="单位" prop="partUnit">
                        <i-input v-model="toolsPartOut.partUnit" placeholder="单位"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="申请部门" prop="useUnit">
                        <i-input v-model="toolsPartOut.useUnit" placeholder="申请部门"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="备注" prop="remark">
                        <i-input type="textarea" v-model="toolsPartOut.remark" placeholder="备注"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">
                返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/tools/toolspartout.js?_${date.systemTime}"></script>
</body>
</html>
